package com.wootion.dizhi.comon;

import org.springframework.stereotype.Component;

import java.text.DecimalFormat;

@Component
public class MathParser {

    private Long pai = 3141593l;

    private Long multiple = 1000000l;

    private Long constant1 = 290l;

    private Long constant2 = 25l;

    private Long constant3 = 9l;

    public MathParser() {

    }
    public String parser(Integer value){
        double i = (constant1 - value) * pai * (constant2 * constant2 - constant3 * constant3);
        double i1 = i / multiple/1000;
        DecimalFormat decimalFormat = new DecimalFormat("#.##");
        return decimalFormat.format(i1);
    }
}
